﻿<Window x:Class="KinectoPhone.Desktop.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:KinectoPhone.Desktop"
        xmlns:interactive3D="clr-namespace:_3DTools;assembly=3DTools"
        WindowStartupLocation="CenterScreen"
        WindowState="Maximized"
        WindowStyle="None"
        Title="BunnyHop" Height="1280" Width="768">
    <Canvas Width="1280" Height="768" Background="Black">
        <Canvas Width="1280" Height="720" Canvas.Top="34"> 
            <Image Source="bkg.png" Width="1280" Height="720" Stretch="Fill" Canvas.Left="0" Canvas.Top="0"/>

            <Grid Width="1280" Height="720" Canvas.Left="0" Canvas.Top="0">
          
                <Viewport3D x:Name="Screen3D">
                    <Viewport3D.Camera>
                        <PerspectiveCamera x:Name="camera" FieldOfView="110" Position="0,0,0" LookDirection="0,0,-1">
                            <PerspectiveCamera.Transform>
                                <TranslateTransform3D x:Name="cameraTranslate" OffsetX="0" OffsetY="0" OffsetZ="0"/>
                            </PerspectiveCamera.Transform>
                        </PerspectiveCamera>
                    </Viewport3D.Camera>
                    <ModelVisual3D>
                        <ModelVisual3D.Content>
                            <Model3DGroup>
                                <AmbientLight Color="#cccccc" />
                                <PointLight x:Name="pointLight" Color="#444444" Position="1,.7,-2" Range="2"/>


                                <GeometryModel3D>
                                    <GeometryModel3D.Geometry>
                                        <MeshGeometry3D Positions="-.5,0,1.5 .5,0,1.5 .5,1,1.5 -.5,1,1.5 
                                                        -.5,0,2.0 .5,0,2.0 .5,1,2.0 -.5,1,2.0"
                        TriangleIndices="0 1 3 1 2 3  0 4 3 4 7 3  4 6 7 4 5 6 
                                         0 4 1 1 4 5  1 2 6 6 5 1  2 3 7 7 6 2"/>
                                    </GeometryModel3D.Geometry>
                                    <GeometryModel3D.Transform>
                                        <Transform3DGroup>
                                            <RotateTransform3D>
                                                <RotateTransform3D.Rotation>
                                                    <AxisAngleRotation3D x:Name="gemRotation" Angle="40" Axis="0,1,0"/>
                                                </RotateTransform3D.Rotation>
                                            </RotateTransform3D>
                                            <ScaleTransform3D ScaleX=".1" ScaleY=".2" ScaleZ=".2"/>
                                            <TranslateTransform3D x:Name="gemPosition" OffsetX=".51" OffsetY=".20" OffsetZ="-3.51"/>

                                        </Transform3DGroup>
                                    </GeometryModel3D.Transform>
                                    <GeometryModel3D.BackMaterial>
                                        <DiffuseMaterial x:Name="gemMaterial0" AmbientColor="White" Brush="#FFCB9CE6"/>
                                    </GeometryModel3D.BackMaterial>
                                    <GeometryModel3D.Material>
                                        <DiffuseMaterial x:Name="gemMaterial1" AmbientColor="White" Brush="#FFCB9CE6"/>
                                    </GeometryModel3D.Material>
                                </GeometryModel3D>


                            </Model3DGroup>
                        </ModelVisual3D.Content>
                    </ModelVisual3D>
                </Viewport3D>
            </Grid>

            <Canvas x:Name="touch_screen" Width="1280" Height="720" Background="#00FF0000">

                <local:BodyMarker x:Name="handL"/>
                <local:BodyMarker x:Name="handR"/>
                <local:BodyMarker x:Name="follow" x="0" y="0"/>
                <local:BodyMarker x:Name="bodyCore" x="0" y="0"/>
            </Canvas>

        </Canvas>

        <Grid Visibility="Collapsed">
            <Grid Margin="12">
                <TextBlock Text="Phone" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold" />
                <TextBlock Text="Angle:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,20,0,0" />
                <TextBlock Text="Hint:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,40,0,0"  />
                <TextBlock x:Name="txtAngle" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,20,0,0" />
                <TextBlock x:Name="txtHint" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,40,0,0"  />

                <StackPanel Margin="0,80,0,0" Width="130" HorizontalAlignment="Left">
                    <TextBlock Text="Computer" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold" Margin="0,0,0,10" />
                    <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
                        <TextBlock Text="Position:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,0,10,0"  />
                        <TextBox Text="0" x:Name="txtPosition" Width="30" />
                    </StackPanel>

                </StackPanel>
            </Grid>
        </Grid>

    </Canvas>
</Window>
